package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.common.entity.QueryPageBean;
import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MedicalExaminationPackageDao {


    Page<Setmeal> findPage(QueryPageBean queryPageBean);

    @Select("select * from t_setmeal where id=#{id}")
    Setmeal findById(Integer id);

    void add(Setmeal setmeal);

    void addMedicalExaminationPackageAndCheckGroup(Integer id, List<Integer> checkgroupIds);


    void editMedicalExaminationPackage(Setmeal setmeal);

    @Delete("delete from t_setmeal_checkgroup where setmeal_id=#{id}")
    void deleteMedicalExaminationPackageAndCheckGroup(Integer id);
}
